cmake_minimum_required(VERSION 2.8.3)
project(nxt_lab2)

#find_package(OpenCV 2.4.6.1 EXACT REQUIRED) 
find_package(OpenCV)

find_package(
  catkin REQUIRED COMPONENTS
  roscpp 
  nxt_ros
  geometry_msgs
  message_generation
)

add_service_files(
  FILES
  MoveToCell.srv
  UpdatedMap.srv
  Neighbors.srv
)

generate_messages(
  DEPENDENCIES
  std_msgs
)

catkin_package(
  CATKIN_DEPENDS message_runtime roscpp nxt_ros geometry_msgs message_runtime
)

include_directories(
  ${OpenCV_INCLUDE_DIRS}
)




add_executable(
  robot src/robot.cpp
)

target_link_libraries(
  robot ${catkin_LIBRARIES}
)

add_dependencies(
  robot robot_gencpp
)




add_executable(map
  src/map.cpp
)
target_link_libraries(map
  ${catkin_LIBRARIES}
  ${OpenCV_LIBS}
)
add_dependencies(
  map map_gencpp
)




add_executable(navigation
  src/navigation.cpp
)
target_link_libraries(navigation
  ${catkin_LIBRARIES}
)
add_dependencies(
  navigation navigation_gencpp
)
